A stepping motor is widely used in robots and the like as a servo motor, for example. The stepping motor will become step-out when an overload is applied or a sudden speed change occurs. The term “step-out” refers to a condition whereby a pulse signal supplied to the stepping motor is not synchronized with an actual rotation of the motor. If a step-out happens, the stepping motor is not rotated to a target position. It is necessary to detect a step-out. In order to detect a step-out, an encoder is equipped with the stepping motor. Since the current position of the stepping motor can be determined based on the output of the encoder, it is possible to detect a mismatch between the target position and the current position as a step-out. Generally, when a step-out of the stepping motor is detected, the stepping motor is stopped immediately. However, for example, in a case the step-out disappears within a short time, it is sometimes better to continue the control as it is without stopping the stepping motor even if a step-out occurs.